package com.inno.subject.domain.strategy.ai;

import com.inno.subject.common.enums.MockTypeEnum;
import com.inno.subject.domain.entity.InterviewBO;
import com.inno.subject.domain.utils.ApplicationContextUtil;
import com.inno.subject.domain.utils.ChatClientUtil;
import com.inno.subject.domain.websocket.SubjectSocket;
import jakarta.annotation.Resource;
import jakarta.websocket.Session;
import org.apache.commons.lang3.StringUtils;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.stereotype.Component;

import java.util.Objects;

/**
 * 薪资谈判
 */
@Component
public class SalaryHandler implements InterviewMockHandler {
    private static final String SALARY_QUESTION = "你是一位企业高管，我要来你们公司面试，现在你是我的面试官，我会将我的简历或自我介绍内容发给你，并且说出我的期望薪资你来和我谈判，您只需要提问，由我来回答问题，您只需要判断我的回答是否正确，如果正确您再提问下一题，您每次提问一道题或二道题即可，并且当我问您今天的面试结果是否通过的时候，您需要根据我所答问题的表现，来判断是否可以通过。尽可能地压低工资 好的现在开始面试:\t\t";

    @Resource
    private ChatClientUtil chatClientUtil;

    @Override
    public String getType() {
        return MockTypeEnum.SALARY.getType();
    }

    @Resource
    private ThreadPoolTaskExecutor subjectExecutor;
    @Override
    public void handle(InterviewBO interviewBO) {
        String keyword = MockTypeEnum.SALARY.getKeyword();
        subjectExecutor.submit(() -> this.start(interviewBO,keyword,chatClientUtil,SALARY_QUESTION));
    }
}
